<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">











<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Maven FileSync Plugin - Using the maven FileSync plugin</title>
    <style type="text/css" media="all">
      @import url("./css/maven-base.css");
      @import url("./css/maven-theme.css");
      @import url("./css/site.css");
    </style>
    <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
          <meta name="author" content="Marek Dec
marek.dec@gmail.com" />
          </head>
  <body class="composite">
    <div id="banner">
                    <span id="bannerLeft">
    
            Maven FileSync Plugin
    
            </span>
                    <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="breadcrumbs">
          
  

  
    
  
  
    
            <div class="xleft">
        Last Published: 2011-05-27
                      </div>
            <div class="xright">      
  

  
    
  
  
    
  </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="leftColumn">
      <div id="navcolumn">
           
  

  
    
  
  
    
                   <h5>Overview</h5>
            <ul>
              
    <li class="none">
                    <a href="index.html">Introduction</a>
          </li>
              
    <li class="none">
                    <a href="plugin-info.html">Goals</a>
          </li>
              
    <li class="none">
              <strong>Usage</strong>
        </li>
              
    <li class="none">
                    <a href="faq.html">FAQ</a>
          </li>
          </ul>
              <h5>Examples</h5>
            <ul>
              
    <li class="none">
                    <a href="examples/example-one.html">Example with fully defined mapping</a>
          </li>
              
    <li class="none">
                    <a href="examples/example-two.html">Minimal configuration</a>
          </li>
              
    <li class="none">
                    <a href="examples/example-three.html">Command line invocation</a>
          </li>
          </ul>
                                           <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
            <img alt="Built by Maven" src="./images/logos/maven-feather.png"></img>
          </a>
                       
  

  
    
  
  
    
        </div>
    </div>
    <div id="bodyColumn">
      <div id="contentBox">
        <div class="section"><h2>Usage</h2>
<p><b>Step Zero:</b> Install the FileSync eclipse plugin, the instructions can be found <a href="http://andrei.gmxhome.de/filesync/index.html" class="externalLink">here</a>.</p>
<p><b>Step One:</b> Add following plugin configuration to the plugins section of your project's <tt>pom.xml</tt> file. Adding this will add a FileSync project builder to your <tt>.project</tt> file. Also FileSync settings file <tt>(.settings/de.loskutov.FileSync.prefs)</tt> will be created and will contain mapping defined in the plugin configuration section. </p>
<div class="source"><pre>  &lt;plugin&gt;
    &lt;groupId&gt;com.google.code.filesync&lt;/groupId&gt;
    &lt;artifactId&gt;maven-filesync-plugin&lt;/artifactId&gt;
    &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
    &lt;configuration&gt;
      &lt;defaultDestination&gt;/home/marek/destination&lt;/defaultDestination&gt;
      &lt;mappings&gt;
        &lt;mapping&gt;
          &lt;sourceFolder&gt;src/main/resources&lt;/sourceFolder&gt;
        &lt;/mapping&gt;
        &lt;mapping&gt;
          &lt;sourceFolder&gt;target/classes&lt;/sourceFolder&gt;
          &lt;inclPatternList&gt;
            &lt;include&gt;**/*.class&lt;/include&gt;
          &lt;/inclPatternList&gt;
          &lt;exclPatternList&gt; 
            &lt;exclude&gt;**/*Test*&lt;/exclude&gt;
            &lt;exclude&gt;**/*.html&lt;/exclude&gt;
          &lt;/exclPatternList&gt;
        &lt;/mapping&gt;
      &lt;/mappings&gt;
    &lt;/configuration&gt;
  &lt;/plugin&gt;</pre>
</div>
<p><b>Step Two:</b> Run mvn filesync:generate </p>
<p><b>Step Three:</b> Refresh the project in the Eclipse workspace.</p>
<p>A complete description of FileSync prefs file format can be found <a href="http://andrei.gmxhome.de/filesync/usage.html" class="externalLink">here</a>. Also the format could be guessed by vieweing generated prefs file <tt>(your_project_root)/.settings/de.loskutov.FileSync.prefs)</tt>. Please see provided examples for more usage information. </p>
</div>

      </div>
    </div>
    <div class="clear">
      <hr/>
    </div>
    <div id="footer">
      <div class="xright">&#169;  
          2011
    
          
  

  
    
  
  
    
  </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
  </body>
</html>
